<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<html lang="en">  
<head>  
    <meta charset="UTF-8">  
    <title>登陆失败</title>  
    <style>  
	  body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            
            align-items: flex-start;
            height: 100vh;
            margin: 0;
        }
        
        .error-container {
            text-align: center;
            padding: 20px;
            border: 2px solid #e74c3c;
            border-radius: 5px;
        }
        
        h1 {
            color: #e74c3c;
        }
        
        p {
            color: #333;
        }
    </style>  
</head>  
<body>  
    <div class="error-container">  
        <h1>登录失败</h1>  
        <p>账户或密码错误，请重新输入！</p>   
        <p>此界面将在 <span id="countdown">3</span> 秒后自动关闭</p>     
    </div>  
</body> 

<script type="text/javascript">  
//获取显示倒计时的元素  
const countdownElement = document.getElementById('countdown');  
  
// 初始倒计时秒数  
let countdownSeconds = 3;  
  
// 更新倒计时显示的函数  
function updateCountdown() {  
    countdownElement.textContent = countdownSeconds;  
    countdownSeconds--;  
  
    // 如果倒计时还未结束，继续倒计时  
    if (countdownSeconds >= 0) {  
        // 使用setTimeout递归调用updateCountdown函数，每次减少1秒  
        setTimeout(updateCountdown, 1000);  
    } else {  
        // 倒计时结束，执行相应操作，比如返回上一页  
        window.history.back();  
    }  
}  
  
// 启动倒计时  
updateCountdown();  
    </script>   
</html>